import service from '@/utils/request'
// @Tags Seckill_activity
// @Summary 创建秒杀活动
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Seckill_activity true "创建秒杀活动"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /seckill_activity/createSeckill_activity [post]
export const createSeckill_activity = (data) => {
  return service({
    url: '/seckill_activity/createSeckill_activity',
    method: 'post',
    data
  })
}

// @Tags Seckill_activity
// @Summary 删除秒杀活动
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Seckill_activity true "删除秒杀活动"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /seckill_activity/deleteSeckill_activity [delete]
export const deleteSeckill_activity = (params) => {
  return service({
    url: '/seckill_activity/deleteSeckill_activity',
    method: 'delete',
    params
  })
}

// @Tags Seckill_activity
// @Summary 批量删除秒杀活动
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除秒杀活动"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /seckill_activity/deleteSeckill_activity [delete]
export const deleteSeckill_activityByIds = (params) => {
  return service({
    url: '/seckill_activity/deleteSeckill_activityByIds',
    method: 'delete',
    params
  })
}

// @Tags Seckill_activity
// @Summary 更新秒杀活动
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Seckill_activity true "更新秒杀活动"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /seckill_activity/updateSeckill_activity [put]
export const updateSeckill_activity = (data) => {
  return service({
    url: '/seckill_activity/updateSeckill_activity',
    method: 'put',
    data
  })
}

// @Tags Seckill_activity
// @Summary 用id查询秒杀活动
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.Seckill_activity true "用id查询秒杀活动"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /seckill_activity/findSeckill_activity [get]
export const findSeckill_activity = (params) => {
  return service({
    url: '/seckill_activity/findSeckill_activity',
    method: 'get',
    params
  })
}

// @Tags Seckill_activity
// @Summary 分页获取秒杀活动列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取秒杀活动列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /seckill_activity/getSeckill_activityList [get]
export const getSeckill_activityList = (params) => {
  return service({
    url: '/seckill_activity/getSeckill_activityList',
    method: 'get',
    params
  })
}

// @Tags Seckill_activity
// @Summary 不需要鉴权的秒杀活动接口
// @Accept application/json
// @Produce application/json
// @Param data query systemReq.Seckill_activitySearch true "分页获取秒杀活动列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /seckill_activity/getSeckill_activityPublic [get]
export const getSeckill_activityPublic = () => {
  return service({
    url: '/seckill_activity/getSeckill_activityPublic',
    method: 'get',
  })
}

// @Tags Seckill_activity
// @Summary 预热秒杀活动Redis库存
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body object true "预热秒杀活动库存"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"预热成功"}"
// @Router /seckill_activity/preheatSeckillStock [post]
export const preheatSeckillStock = (data) => {
  return service({
    url: '/seckill_activity/preheatSeckillStock',
    method: 'post',
    data
  })
}
